<template>
	<view>
		<view class="header">
			可提现余额 {{withdrawal}}
		</view>
		<view class="wollet box d-ai-c">
			<view class="">
				￥
			</view>
			<input type="text" value="200" placeholder="请输入提现金额" placeholder-style="font-size:33rpx" v-model="money" />
		</view>
		<view class="font">
			提现到账
		</view>
		<image class="weixin" src="https://xb-street.oss-cn-shanghai.aliyuncs.com/xb-doctor-manage/static/images/wxlq@2x.png" mode=""></image>
		<view class="font">
			提现说明
		</view>
		<view class="statement">
			1.提现到账微信零钱，预计两个工作日内到账 
		</view>
		<view class="statement">
			2.单次提现金额最高200元
		</view>
		<!-- <view class="statement">
			3.每日可提现1次
		</view> -->
		<view class="btn" @tap="wxdrawings">
			立即提现
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				money:'',
				withdrawal:'',
			}
		},
		onLoad(option) {
			this.withdrawal = option.money
		},
		methods: {
			wxdrawings(){
				let _this = this
				uni.showModal({
				    title: '提示',
				    content: '确认是否要提现',
				    success: function (res) {
				        if (res.confirm) {
							_this.getcash()
				        } else if (res.cancel) {
				            console.log('用户点击取消');
				        }
				    }
				});
				
			},
			getcash(){
				this.$api.wxdrawings({
					money:this.money
				}).then((res) => {
					if(res.data.success){
						uni.showToast({
							title:'提现成功，预计两个工作日内到账',
							icon:'none'
						})
						setTimeout(()=>{
							uni.navigateBack({
							delta:1
							})
						},600)
						
					}else{
						uni.showToast({
							title:res.data.message,
							icon:'none'
						})
					}
					
							
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.box{
		display: flex;
	}
	.d-ai-c{
		align-items: center;
	}
	.d-jc-sb{
		justify-content: space-between;
	}
.header{
	font-size: 40rpx;
	font-weight: bold;
	color: #333333;
	padding-top: 50rpx;
	padding-left: 40rpx;
}
.wollet{
	width: 690rpx;
	height: 120rpx;
	background: #FFFFFF;
	box-shadow: 0rpx 2rpx 0rpx 0rpx #EEEEEE;
	margin: 0 auto;
	view{
		font-size: 52rpx;
	}
	input{
		font-size: 52rpx;
		font-weight: bold;
		color: #333333;
	}
}
.font{
	margin-top: 60rpx;
	margin-left: 30rpx;
	font-size: 32rpx;
	font-weight: bold;
	color: #333333;
}
.weixin{
	margin-top: 36rpx;
	margin-left: 30rpx;
	width: 240rpx;
	height:88rpx;
}
.statement{
	margin-left: 30rpx;
	margin-top: 20rpx;
	font-size: 28rpx;
	font-weight: 500;
	color: #666666;
}
.btn{
	width: 690rpx;
	height: 100rpx;
	background: linear-gradient(90deg, #4DBDFD 0%, #508BEF 100%);
	box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(80, 139, 239, 0.16);
	border-radius: 8rpx;
	font-size: 32rpx;
	font-weight: bold;
	color: #FFFFFF;
	line-height: 100rpx;
	text-align: center;
	margin: 0 auto;
	margin-top: 100rpx;
}
</style>
